package com.buka.recipe.system.repository;

import com.buka.recipe.system.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface UserRepository extends JpaRepository<User, Integer>, JpaSpecificationExecutor<User> {

    User findByUsername(String username);

    User findByOpenid(String openid);

    List<User> findUsersByDepartmentId(Integer departmentId);

}
